<!-- 等比例 -->
<span style="outline: 1px solid gray">

    <svg width="200" height="300" viewBox="0 0 400 400" 
        preserveAspectRatio="xMidYMid slice">
        <rect x="100" y="100" width="200" height="200" fill="red"></rect>
    </svg>

</span>

<!-- 非等比例 -->
<span style="outline: 1px solid gray">

    <svg width="200" height="200" viewBox="0 0 400 400">
        <rect x="100" y="100" width="200" height="200" fill="red"></rect>
    </svg>

</span>